<style>
    .yx{
        display: inline-block;
        margin-bottom: 0;
        font-weight: normal;
        text-align: center;
        vertical-align: middle;
        touch-action: manipulation;
        cursor: pointer;
        background-image: none;
        white-space: nowrap;
        padding: 6px 12px;
        font-size: 13px;
        line-height: 1.42857143;
        box-shadow: none;
        border: 1px solid transparent;
        color: #fff;
        background-color: #35110e;
        border-radius: 3px;
    }

    
	.col-xs-3{
		width: 50% !important;
		height: 650px !important;
	}
    .thumbnail{
        height: 600px !important;
    }
    .img-responsive{
        width: 90% !important;
        height: 580px !important;
    }
</style>
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" class="mb_id" value="{$row.id}">
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">模版标题:</label>
        <div class="col-xs-12 col-sm-8" style="margin-top:7px;">
            {$row.template_title}
        </div>
    </div>
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">模版类型:</label>
        <div class="col-xs-12 col-sm-8" style="margin-top:7px;">
            {if $row.type == 1}
                通用模版
            {else/}
                类目模版
            {/if}
        </div>
    </div>
    {if $row.type == 2}
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">所属类目:</label>
        <div class="col-xs-12 col-sm-8" style="margin-top:7px;">
            {$row.category_name}
        </div>
    </div>
    {/if}
    <!-- <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">任务类型:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="task_type" data-rule="required" class="form-control"  name="row[task_type]">
                <option value="1" >小红书任务</option>
                <option value="2" >抖音任务</option>
                <option value="3" >快手任务</option>
            </select>
        </div>
    </div> -->
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">任务所属:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="type"  data-rule="required" class="form-control selectpicker"  data-live-search="true" name="row[type]">
                {foreach name="type_arr" item="vo"}
                <option value="{$vo}">{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="yuxiang">
        <!-- <div class="form-group">
            <label for="email" class="control-label col-xs-12 col-sm-2">账号人设:</label>
            <div class="col-xs-12 col-sm-8">
                <select id="character_type"  class="form-control"  name="row[character_type]">
                    <option value="1" >素人</option>
                    <option value="2" >官方合作</option>
                </select>
            </div>
        </div> -->
    
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">商品名称:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control name" placeholder="" name="row[name]" type="text" value="">
            </div>
        </div>
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">品牌:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control brand" placeholder="" name="row[brand]" type="text" value="">
            </div>
        </div>
    </div>
    <div class="dianshiju" style="display:none;">
        <div class="form-group">
            <label for="email" class="control-label col-xs-12 col-sm-2">地区:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control location" placeholder="" name="row[location]" type="text" value="">
            </div>
        </div>
    
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">规格:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control Size" placeholder="" name="row[Size]" type="text" value="">
            </div>
        </div>
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">项目:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control Type" placeholder="" name="row[Type]" type="text" value="">
            </div>
        </div>
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">公司:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control company" placeholder="" name="row[company]" type="text" value="">
            </div>
        </div>
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">岗位:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control role" placeholder="" name="row[role]" type="text" value="">
            </div>
        </div>
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">原文1:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control Intro1" placeholder="" name="row[Intro1]" type="text" value="">
            </div>
        </div>
        <div class="form-group titel">
            <label for="username" class="control-label col-xs-12 col-sm-2">原文2:</label>
            <div class="col-xs-12 col-sm-8">
                <input   class="form-control form-control Intro2" placeholder="" name="row[Intro2]" type="text" value="">
            </div>
        </div>
    </div>
    
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">类目：</label>
		<div class="col-xs-12 col-sm-6">
            <select id="c-question_id"  class="form-control selectpicker category"  data-live-search="true" name="row[category][]">
                {foreach name="category_list" item="vo"}
                <option value="{$vo.id}" >{$vo.name}</option>
                {/foreach}
            </select>
            <input   class="form-control form-control category1" placeholder="请输入该任务所属类目名称" name="row[category1]" type="text" value="" style="display: none;">
            <div class="luru" data-type="category1" style="margin-top: -28px;
            margin-left: 110%;
            width: 130px;
            background: #7b7575;
            color: #fff;
            text-align: center;
            height: 26px;
            line-height: 26px;
            border-radius: 10px;
            cursor: pointer;">手动录入/下拉选择</div>
		</div>
	</div>
    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">备注：</label>
		<div class="col-xs-12 col-sm-8">
			<input  class="form-control form-control" placeholder="选填" name="row[beizhu]" type="text" value="">
		</div>
	</div>

    <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">指定省：</label>
		<div class="col-xs-12 col-sm-6">
            <select   class="form-control selectpicker "  data-live-search="true" name="row[province][]">
                <option value="" >请选择</option>
                {foreach name="AreaList" item="vo"}
                <option value="{$vo.name}" >{$vo.name}</option>
                {/foreach}
            </select>
		</div>
	</div>

    <!-- <div class="form-group form-input form-input-title">
		<label class="control-label col-xs-12 col-sm-2">类目：</label>
		<div class="col-xs-12 col-sm-8">
			<input  data-rule="required" class="form-control form-control" placeholder="请输入该任务所属类目名称" name="row[category]" type="text" value="">
		</div>
	</div> -->
    <div class="form-group titel">
        <label for="username" class="control-label col-xs-12 col-sm-2">生成任务数量:</label>
        <div class="col-xs-12 col-sm-8">
            <input  data-rule="required" class="form-control form-control mb_num" placeholder="" name="row[num]" type="text" value="1">
        </div>
    </div>
    <div class="form-group">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">添加产品:</label>
        <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button"  class="btn btn-danger  product" style="float: left;"> 上传</button></span>
                        <span style="float: left;line-height: 30px;margin-left: 40px;">产品名称:<span class="title" style="color: #000;font-size: 16px;font-weight: 600;"></span></span>
                    </div> 
                </div>
        </div>
    </div>
    <input type="hidden" class="product_id" name="row[product_id]" value="">
    
    <div class="form-group">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">对应图片库:</label>
        <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="c-avatars" data-rule="" class="form-control" size="50" name="row[imgs]" type="text" value=""  style="display: none;">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatars" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-avatars"><i class="fa fa-upload"></i> 上传图片</button></span>
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatars" data-mimetype="mp4,mp3,avi,flv,wmv" data-multiple="true" data-preview-id="p-avatars" data-maxsize="10M"><i class="fa fa-upload"></i> 上传视频</button></span>
                    </div>
                    <span class="msg-box n-right" for="c-avatars"></span>
                </div>
                
                <ul class="row list-inline plupload-preview" id="p-avatars" style="width: 100%;"></ul>
        </div>
    </div>

    <div class="form-group xiao">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">智能生成图片: <span style="color: red;">(上传图片后生成新的图片)</span> </label>
        <div class="col-xs-12 col-sm-10">
                <div class="input-group">
                    <input id="new"  style="display: none;">
                    <input id="c-avatarss" data-rule="" class="form-control" size="50" name="row[zn_imgs]" type="text" value=""  style="display: none;">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatarss" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-avatarss"><i class="fa fa-upload"></i> 上传图片</button></span>


                        <span><button type="button" id="shengcheng" class="btn"  >生成图片</button></span>
                        <span><input  class="form-control form-control ings" placeholder=""  type="text" value=""></span>
                        

                    </div>
                    <span class="msg-box n-right" for="c-avatarss"></span>
                </div>
                <ul class="row list-inline plupload-preview preview111" id="p-avatarss" style="width: 100%;"></ul>
        </div>
    </div>

    
    <div class="form-group" style="margin-top: 50px;">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
                <div class="yx"  >生成结果预览</div>
        </div>
    </div>
    <div id="yulan">
       
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
